Optimal. Leaf size=60 \[ -\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{a f \sqrt {a-b}}-\frac {\tanh ^{-1}(\cos (e+f x))}{a f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3664, 391, 207, 205} \[ -\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{a f \sqrt {a-b}}-\frac {\tanh ^{-1}(\cos (e+f x))}{a f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 205
Rule 207
Rule 391
Rule 3664
Rubi steps
\begin {align*} \int \frac {\csc (e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{\left (-1+x^2\right ) \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{f}\\ &=\frac {\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (e+f x)\right )}{a f}-\frac {b \operatorname {Subst}\left (\int \frac {1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{a f}\\ &=-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{a \sqrt {a-b} f}-\frac {\tanh ^{-1}(\cos (e+f x))}{a f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.24, size = 144, normalized size = 2.40 \[ \frac {\sqrt {b} \sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b}-\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )+\sqrt {b} \sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b}+\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )-(a-b) \left (\log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (e+f x)\right )\right )\right )}{a f (a-b)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 184, normalized size = 3.07 \[ \left [\frac {\sqrt {-\frac {b}{a - b}} \log \left (\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} + 2 \, {\left (a - b\right )} \sqrt {-\frac {b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) - \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) + \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{2 \, a f}, -\frac {2 \, \sqrt {\frac {b}{a - b}} \arctan \left (-\frac {{\left (a - b\right )} \sqrt {\frac {b}{a - b}} \cos \left (f x + e\right )}{b}\right ) + \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - \log \left (-\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right )}{2 \, a f}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.56, size = 75, normalized size = 1.25 \[ \frac {b \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {\left (a -b \right ) b}}\right )}{f a \sqrt {\left (a -b \right ) b}}+\frac {\ln \left (-1+\cos \left (f x +e \right )\right )}{2 f a}-\frac {\ln \left (1+\cos \left (f x +e \right )\right )}{2 f a} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 11.86, size = 91, normalized size = 1.52 \[ \frac {\ln \left (\frac {\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )}{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}\right )}{a\,f}-\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {b-a\,\cos \left (e+f\,x\right )+b\,\cos \left (e+f\,x\right )}{2\,\sqrt {b}\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\sqrt {a-b}}\right )}{a\,f\,\sqrt {a-b}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc {\left (e + f x \right )}}{a + b \tan ^{2}{\left (e + f x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________